package com.base.service.COUPON.impl;

import com.base.mapper.couponmapper.CouponOrderMapper;
import com.base.po.voip_coupon.CouponOrder;
import com.base.po.voip_coupon.CouponOrderExample;
import com.base.service.COUPON.CouponOrderService;
import com.base.utils.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("couponOrderService")
public class CouponOrderServiceImpl implements CouponOrderService {
    @Autowired
    private CouponOrderMapper couponOrderMapper;


    @Override
    public int countByExample(CouponOrderExample example) {
        return couponOrderMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(CouponOrderExample example) {
        return couponOrderMapper.deleteByExample(example);
    }

    @Override
    public int insert(CouponOrder record) {
        return couponOrderMapper.insert(record);
    }

    @Override
    public int insertSelective(CouponOrder record) {
        return couponOrderMapper.insertSelective(record);
    }

    @Override
    public List<CouponOrder> selectByExample(CouponOrderExample example) {
        return couponOrderMapper.selectByExample(example);
    }

    @Override
    public List<CouponOrder> selectAll(Page page, String parentId, String userId, Integer orderStatus, Integer status) {
        return couponOrderMapper.selectAll(page, parentId, userId, orderStatus, status);
    }

    @Override
    public CouponOrder selectByPrimaryKey(String id) {
        return couponOrderMapper.selectByPrimaryKey(id);
    }

    @Override
    public CouponOrder selectByFlag(Integer flag) {
        return couponOrderMapper.selectByFlag(flag);
    }

    @Override
    public int updateByExampleSelective(CouponOrder record, CouponOrderExample example) {
        return couponOrderMapper.updateByExampleSelective(record, example);
    }

    @Override
    public int updateByExample(CouponOrder record, CouponOrderExample example) {
        return couponOrderMapper.updateByExample(record, example);
    }

    @Override
    public int updateByPrimaryKeySelective(CouponOrder record) {
        return couponOrderMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int countAll(String parentId, String userId, Integer orderStatus, Integer status) {
        return couponOrderMapper.countAll(parentId, userId, orderStatus, status);
    }
}
